<?php
/**
 * 流程控制语句
 * match php>=8.0
 * 严格比较
 **/
$food = 'cake';

$v = match ($food) {
    'apple' => 'This food is an apple',
    'bar' => 'This food is a bar',
    'cake' => 'This food is a cake',
};


var_dump($v);